from django.urls import path, re_path

from hello.views import hello_world, hello_china, hello_html, article_list, search, render_str, render_html, \
    http_request, no_data_404, article_detail, index, HomeView, tag, temple_test, test_filter, mine_filter, rearch

urlpatterns = [
    path('world/', hello_world, name='hello_world'),
    path('china/', hello_china, name='hello_china'),
    path('html/', hello_html, name='hello_china'),
    # path('article/<int:month>/',article_list,name='article_list'),
    re_path(r'^article/(?P<month>0?[1-9]|1[012])/$', article_list, name='article_list'),
    # re_path(r'^search/(?P<name>0?[1-9]|1[012])/$', search, name='search'),
    re_path(r'^search/(?P<name>0?[1-9]|[1-9][0-9]|100)/$', search, name='search'),
    path('render/str/', render_str, name='render_str'),
    path('render/html', render_html, name='render_html'),
    path('http/req/', http_request, name='http_request'),
    path('404/', no_data_404, name='no_data_404'),
    path('article/<int:article_id>/', article_detail, name='article_detail'),
    path('home/', HomeView.as_view(), name='home'),
    path('index/', index, name='index'),
    path('tag/', tag, name='tag'),
    path('temple_test/', temple_test, name='temple_test'),
    path('test/filter/', test_filter, name='test_filter'),
    path('mine/filter/', mine_filter, name='mine_filter'),
    path('rearch/',rearch,name='rearch')
]
